(define
    (next-fib prev1 prev2)
    (let
        (
            (fib (+ prev1 prev2))
        )
        (cons prev1 (delay (next-fib fib prev1)))
    )
)

(define
    (fib-seq)
    (cons 0 (delay (next-fib 1 0)))
)

(define
    (fib-value fib-iter)
    (car fib-iter)
)

(define
    (fib-next fib-iter)
    (force (cdr fib-iter))
)

; Main --------------------------------
(do
    ; Loop variants
    (
        (fib-count
            (+ 1 (string->number (list-ref (command-line-arguments) 0)))
            (- fib-count 1)
        )
        (fib-iter
            (fib-seq)
            (fib-next fib-iter)
        )
    )
    ; Conditional
    ((= fib-count 0) (display "...") (newline))
    ; Body
    (display (string-append (number->string (fib-value fib-iter)) " "))
)
